﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using mitasoft.Commands.Interfaces;
using StructureMap;
using mitasoft.Component.Services.Interfaces;

namespace mitasoft.Commands
{
    public class GetPostsCommand : ICommand
    {
        private IBlogService _blogService = null;

        public void RunCommand()
        {
            Init();
            DoWork();

        }


        private void DoWork()
        {
            var posts = _blogService.GetPosts();

        }

        private void Init()
        {
            InitDIDependencies();  
        }

        private void InitDIDependencies()
        {
            _blogService = ObjectFactory.GetInstance<IBlogService>();
        }
    }
}
